﻿using System;
using UnityEngine;
using UnityEngine.UI;

namespace Studio
{
	// Token: 0x020005BB RID: 1467
	public class ScrollSizeCorrect : MonoBehaviour
	{
		// Token: 0x06002561 RID: 9569 RVA: 0x000DD75C File Offset: 0x000DB95C
		private void OnRectTransformDimensionsChange()
		{
			float size = Mathf.Min(1f, this.transBase.rect.height / this.transTarget.rect.height);
			this.scrollbar.size = size;
			if (this.scrollbar.value == 0f)
			{
				this.scrollbar.value = 0.1f;
				this.scrollbar.value = 0f;
			}
		}

		// Token: 0x040025CF RID: 9679
		[SerializeField]
		private RectTransform transBase;

		// Token: 0x040025D0 RID: 9680
		[SerializeField]
		private RectTransform transTarget;

		// Token: 0x040025D1 RID: 9681
		[SerializeField]
		private Scrollbar scrollbar;
	}
}
